Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(stable): generate latest types & add types for instances - 02.07.2024 #1120

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

deep-cognite
Copy link
Contributor

@deep-cognite deep-cognite commented Jul 2, 2024

  • Enable codegen for 'InstancesAPI'
  • Pull latest openapi snapshot for the stable package
  • Affected endpoints: annotations*, vision* & instances
  • Update the methods in InstanceAPI with changes to param and response type name (search, retrieve, aggregate)

NOTE (*): Due to changes done in the following commit https://github.com/cognitedata/service-contracts/commit/191ddb3b200091afa65a3adf9ba2482ff11aa7ed, the types for vision (similar to annotations) were changed from containing 'Cognite' to 'Cogmono'. Not sure what to do here.

@deep-cognite deep-cognite changed the title chore(stable): generate latest types (using codegen) - 02.07.2024 chore(stable): generate latest types (using codegen) & add types for instances - 02.07.2024 Jul 2, 2024
@deep-cognite deep-cognite changed the title chore(stable): generate latest types (using codegen) & add types for instances - 02.07.2024 chore(stable): generate latest types & add types for instances - 02.07.2024 Jul 2, 2024
@andersfylling
Copy link
Contributor

andersfylling commented Jul 4, 2024

NOTE (*): Due to changes done in the following commit https://github.com/cognitedata/service-contracts/commit/191ddb3b200091afa65a3adf9ba2482ff11aa7ed, the types for vision (similar to annotations) were changed from containing 'Cognite' to 'Cogmono'. Not sure what to do here.

It's the teams responsibility to handle these cases; if you rename your types in the service contracts repo it's a breaking change. It's quite easy to forget as this feature isn't enforced in the service contract repo in any way, so we can ping them and see if they want to:

  1. rename the types to avoid a breaking change
  2. put codegen for vision on pause till later (perhaps there are others that want to do a breaking change as well?)
  3. release a major version as they've done some structural breaking changes.

@marvrez @miladcognite could you take a look?

@miladh
Copy link

miladh commented Jul 7, 2024

NOTE (*): Due to changes done in the following commit cognitedata/service-contracts@191ddb3, the types for vision (similar to annotations) were changed from containing 'Cognite' to 'Cogmono'. Not sure what to do here.

It's the teams responsibility to handle these cases; if you rename your types in the service contracts repo it's a breaking change. It's quite easy to forget as this feature isn't enforced in the service contract repo in any way, so we can ping them and see if they want to:

  1. rename the types to avoid a breaking change
  2. put codegen for vision on pause till later (perhaps there are others that want to do a breaking change as well?)
  3. release a major version as they've done some structural breaking changes.

@marvrez @miladcognite could you take a look?

The change from 'Cognite' to 'Cogmono' is related to migration (driven by the infra team) of several Python packages to the mono-repo.

I'm not familiar with how we do versioning in the JS SDK, but do you see any issues with releasing a new major version of the SDK?

@deep-cognite
Copy link
Contributor Author

Sooo, what's the next step to do here? I could disable auto-gen for visions and annotations API such that we can merge the type updates for data modelling

@miladh
Copy link

miladh commented Aug 7, 2024

I could disable auto-gen for visions and annotations API such that we can merge the type updates for data modelling

for visions: sounds good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants